#pragma once
#include <QFont>
#include <QRect>
#include <QString>
#include <QVector>
#include <QWidget>

class CAccountInfoMenuItem {
 public:
  CAccountInfoMenuItem();
  ~CAccountInfoMenuItem();

 public:
  int m_nID;
  QString m_strTitle;
  QRect m_rect;
  QVector<CAccountInfoMenuItem> m_SubMenu;
};

class CAccountInfoMenu : public QWidget {
 public:
  CAccountInfoMenu();
  ~CAccountInfoMenu();

  void SetFont(QFont& lfHead, QFont& lfContent);
  void SetSelect(int nID);
  void DrawMenu(QPainter* painter);
  void Resize(int x, int y, int nWidth, int nHeight);
  int OnMouseMove(QPoint pt);
  int OnLButtonDown(int x, int y);
  bool InstMenu(QString strMenu, int nID, int nParentID = -1);

 protected:
  QFont m_lfHead, m_lfContent;
  QRect m_Rect;
  QVector<CAccountInfoMenuItem> m_Menu;
  int m_nIDHover;
  int m_nIDPos;
  int m_nIDSelect;
};
